<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">年份选择:</label>
        <div class="col-xs-12 col-sm-2">
            <input id="c-year_id" data-rule="required" data-date-format="YYYY" style="width:120px;" class="form-control datetimepicker" name="row[year_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group stagework">
        <label class="control-label col-xs-12 col-sm-2">月份设置:</label>
        <div class="col-xs-12 col-sm-8">
          <table class="table fieldlist" data-template="labor2tpl" data-name="row[months]" id="second-table">
              <tr>
                  <td>{:__('月份')}</td>
                  <td>{:__('费用（元）')}</td>
                  <td>{:__('兼职人次')}</td>
                  <td>{:__('实习生人次')}</td>
                  <td width="100"></td>
              </tr>
              <!--
              <tr>
                  <td colspan="5"><a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a></td>
              </tr>
              -->
          </table>

          <!--请注意实际开发中textarea应该添加个hidden进行隐藏-->
          <textarea name="row[months]" class="form-control hidden" cols="30" rows="5">{$row.months|htmlentities}</textarea>
          <script id="labor2tpl" type="text/html">
              <tr class="form-inline">
                  <td><%=row.month%><input type="hidden" name="<%=name%>[<%=index%>][month_id]" value="<%=row.month_id%>"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][fee_total]" class="form-control" size="8" value="<%=row.fee_total%>" placeholder="费用"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][parttime_total]" class="form-control" size="8" value="<%=row.parttime_total%>" placeholder="兼职人次"/></td>
                  <td><input type="text" name="<%=name%>[<%=index%>][intern_total]" class="form-control" style="width:100px" value="<%=row.intern_total%>" placeholder="实习生人次"/></td>
                  <td>
                      <!--下面的两个按钮务必保留-->
                      <!--<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>-->
                      <!--<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>-->
                  </td>
              </tr>
          </script>
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <input id="c-depart_id" class="form-control" type="hidden" name="row[pt_depart_id]" type="text" value="{$row.pt_depart_id}">
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
